def fibonacci(n):
	if n == 1:
		return 0
	n1 = 0
	n2 = 1
	currentNum = 1
	i = 2
	while i < n-1:
		n1 = n2
		n2 = currentNum
		currentNum = n1 + n2
		i += 1
	return currentNum

n = int(input())
print(fibonacci(n))